package org.elanfox.intellicommunity.intellicommunityadmin.dto;

import lombok.Data;
import lombok.NoArgsConstructor;
import org.elanfox.intellicommunity.biz.entity.equipment.BaseStationPO;
import org.elanfox.intellicommunity.data.base.dto.BaseDTO;

/**
 * @author allan
 * @version 1.0.0
 * @date 2020/3/23
 */
@Data
@NoArgsConstructor
public class BaseStationDTO implements BaseDTO {
    private static final long serialVersionUID = -2594544141207159086L;

    private Integer stationId;
    private long deviceAddr;
    private int lfScope;
    private boolean rssiEnabled;
    private int rssiLimitVal;
    private boolean buzzerStatus;
    private int filterInterval;

    public BaseStationDTO(BaseStationPO baseStationPO) {
        this.stationId = baseStationPO.getBaseStationId();
        this.deviceAddr = baseStationPO.getDeviceAddr();
        this.lfScope = baseStationPO.getLfScope();
        this.rssiEnabled = baseStationPO.isRssiEnabled();
        this.rssiLimitVal = baseStationPO.getRssiLimitVal();
        this.buzzerStatus = baseStationPO.isBuzzerStatus();
        this.filterInterval = baseStationPO.getFilterInterval();
    }
}
